package com.forekonw.demotext1;
/**
 * 三、输出100到1000的水仙花数
 */
public class Test3 {
    public static void main(String[] args) {
       int[] array = new int[900];
       int j =100;
       for (int i = 0;i<array.length;i++){
           array[i]=j++;
           int nub = array[i];
           int a = nub %100 %10;
           int b = nub /10 %10;
           int c = nub /100;
           int d = a*a*a;
           int e = b*b*b;
           int f = c*c*c;
           if (d+e+f==nub){
               System.out.println(nub);
           }
       }
    }
}
